<html>
<head>
<title>main</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="{{$css_dir}}/admin.css" />
<script type="text/javascript" src="{{$js_dir}}/check.js"></script>
<script type="text/javascript">
	function setCategory(intValue) {
		var strValue;
		var tmpNumber = document.myform.number.value.substring(document.myform.number.value.length - 10);	//取后十位如:2008100701
		
		switch(intValue) {
			case "11":
				strValue = "图书";
				break;
			case "12":
				strValue = "证件";
				break;
			case "13":
				strValue = "文具";
				break;
			case "14":
				strValue = "服饰";
				break;
			case "15":
				strValue = "雨具";
				break;
			case "16":
				strValue = "其他";
				break;
			case "21":
				strValue = "电子类";
				break;
			case "22":
				strValue = "钱物类";
				break;
			case "23":
				strValue = "模糊类";
				break;
			case "24":
				strValue = "贵重其他";
				break;
			default :
				strValue = "";
		}
		
		if(intValue < 20) {
			document.myform.number.value = "00" + tmpNumber;
		}else {
			document.myform.number.value = "01" + tmpNumber;
		}
		
		document.myform.category.value = strValue;
	}
</script>
</head>
<body>
<div class="main">
<form action="<?php url('AdminProperty','LostPropertyAdd') ?>" name="myform" method="post" onSubmit="return CheckForm(this);">
<div class="category">
	失物类别:
	<input type="text" name="category" readonly />
	<select name="category_select" onChange="setCategory(this.options[this.selectedIndex].value)">
	  <option value="">请选择种类</option>
	  <option value="11">图书</option>
	  <option value="12">证件</option>
	  <option value="13">文具</option>
	  <option value="14">服饰</option>
	  <option value="15">雨具</option>
	  <option value="16">其他</option>
	  <option value="21">电子类</option>
	  <option value="22">钱物类</option>
	  <option value="23">模糊类</option>
	  <option value="24">贵重其他</option>
	</select>
</div>
<div>
	失物名称:
      <input type="text" name="name" />
</div>
<div>
	失物编号:
      <input type="text" name="number" readonly="true" value="<?php echo $number?>" />
</div>
<div>
	失物特征(简单,对外公开):
	<textarea name="feature_simple"></textarea>
</div>
<div>
	失物特征(详细,不公开):
	<textarea name="feature_detail"></textarea>
</div>
<div>
	拾获人:
      <input name="pick_up_by" type="text" value="不详" />
</div>
<div>
	拾获时间:
      <input name="pick_up_at" type="text" value="<?php echo date('Y-m-d')?>" />
</div>
<div>
	拾获地点:
      <input type="text" name="pick_up_in" />
</div>
<div>
	拾获人联系方式:
      <input name="pick_up_contact" type="text" />
</div>
<div>
	登记人:
      <input type="text" name="recorder" value="<?php echo $user['username'] ?>" />
</div>
<div class="storePlace">
	存放地点:
	<input type="text" name="store_place" readonly />
	<select name="store_place_select" onChange="(document.myform.store_place.value=this.options[this.selectedIndex].value)">
	  <option value="">请选择存放地点</option>
	  <option value="普通柜①">普通柜①</option>
	  <option value="普通柜②">普通柜②</option>
	  <option value="普通柜③">普通柜③</option>
	  <option value="书架">书架</option>
	  <option value="贵重柜">贵重柜</option>
	</select>
</div>
<div>
	认领通知:
    <input type="radio" name="informed" value="是">是
    <input type="radio" name="informed" value="否" checked>否
</div>
<div>
	失物状态:
	<input type="radio" name="status" value="未处理" checked>未处理
	<input type="radio" name="status" value="已归还">已归还
    <input type="radio" name="status" value="已处理">已处理
</div>
<input type="submit" name="Submit" value="提交" /> | 
<input type="reset" name="Reset" value="重写" />
</form>
</div>
</body></html>